home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
651-660
/
659
/
gadtoolsbox
/
gadtoolsbox.lha
/
View.DOC
< prev
next >
Wrap
Text File
|
1992-04-16
|
22KB
|
468 lines
- View version 2.0 -
----------------------------------------
- © Copyright 1991-92 Jaba Development -
- written using DICE C by -
- Jan van den Baard -
----------------------------------------
This program uses both the powerpacker.library
and reqtools.library (OS 2.0 version)
These two libraries are (c) Copyright Nico François
and the full distribution can be found on Fish Disk 575.
__ __
/ / / \
__ / / / /\ \
_____\ \__/ /_/ /_/ /_____
(__________________________)
DISCLAIMER
----------------------------------------------------------------------------
The author is not responsible for any damage caused by the use or misuse of
this documentation and/or the program(s) it describes. Any damage resulting
from the use or misuse of this documentation and/or the program(s) it
describes is the sole responsibility of the user her/him self.
----------------------------------------------------------------------------
COPYRIGHT
----------------------------------------------------------------------------
View, © Copyright 1991-92 Jaba Development. All rights reserved. This
program may be distributed non-commercially providing that the source
code, documentation, copyright notices and executable remain unchanged and
are included in the distribution. Also no more than a
!NOMINAL!
copy fee may
be charged for the distribution. This program is
FREEWARE
so no financial
donations are required ( The only thing I would like is a postcard from your
home town!). Any form of commercial usage is not allowed without my written
permission.
----------------------------------------------------------------------------
I have again re-written the biggest part of View. This was really necessary
because it did not make use of 2.04 as much as it could. Also the source of
View wasn't exactly modular and easy to read. Therefore I have re-written
most parts. I think it looks much better now and it's easier to read. View
is still
MORE
compatible.
View KeyMap commands :
Space
,
Pg Dn
->
This will go down one page of text (
MORE
). If there are not enough
lines left in the text to fill the screen this function will go
down 'x' amount of lines until the last line is displayed.
Backspace
,
Pg Up
->
This will go up one page of text (
LESS
). If there are not enough
lines left in the text to fill the screen this function will go
up 'x' amount of lines until the first line is displayed.
Return
,
Dn
,
Nk Dn
->
This will scroll the text up one line and display the next line of
text at the bottom of the screen.
Enter
,
Up
,
Nk Up
->
This will scroll the text down one line and display the next line of
text at the top of the screen.
<
,
Nk Left
->
This will display the first page of the text.
>
,
Nk Right
->
This will display the last page of the text.
/
,
F
->
This opens a little window in which a string gadget is located. In
this string gadget you can type a word or a sentence you want to
locate in the text. Once you are done you should press return and
the program starts to look from the first line on the screen for
the specified string. If the program finds the string in the text
it will be displayed inverse. The search is case sensitive. Note:
The found string will keep on being displayed highlighted even when
you scroll the string of the screen and back on the screen again.
N
/
P
->
This will look for the
N
ext/
P
revious occurrence of the word last
found. The search will begin from the point where the program had
found the string the last time you have called one of the search
routines. The search is case sensitive.
.
,
S
->
This does the same thing as
/
,
F
with the exception that the search
will be case insensitive.
CTRL+N
/
CTRL+P
->
This does the same thing as
N
/
P
with the exception that the search
will be case insensitive
CTRL+L
,
R
->
This will redisplay the text on the screen in the (unlikely) event
that the display has been damaged for one or the other reason. This
has been featured to keep it all compatible to
MORE
.
%
->
This opens a little window with an integer gadget in it. In this
integer gadget you can type the percentage (0 to 100) of the file
you want to jump to.
E
->
For this to work you must use
SetEnv
to set-up an environment
variable called
EDITOR
. For example, if you normally use dme as your
editor and this editor is located in the C: directory you should
type the following in the shell: SetEnv EDITOR=Dme. The routine
checks the shell it's path list to find the editor so you do not
have to type the full pathname if the editor is located in a
directory which is in the path list. If the environment is set up
correctly the program will run the editor with the file currently
in memory.
NOTE: This option is only available when View has been
started from the shell! This option is not available at all in the
auto-detach version of View!
L
->
This opens the ReqTools FileRequester for you to select a file
you want to read. When you are done select
Load
and, if everything
went OK, after the loading is done the first page of the file
you have selected is displayed.
J
->
This is a feature not found in many of the other ASCII file viewers.
This will jump to the position where the program has found a string
the last time one of the search routines where called. It's a
feature I use a lot.
B
->
This puts View to sleep. The program closes the screen and waits
until the user call's view by pressing a hotkey. See below for the
hotkeys. The text in memory will be lost.
CTRL+B
->
This does the same thing as
B
with the exception that the text will
stay in memory and will be available when View is signalled to
wake-up again.
LSHIFT+CTRL+D
->
This will dump the page currently on the screen to the printer. It
uses the printer.device so make sure that it's set correctly. While
the printing is in progress a little window is in the screen's top
left corner. Closing this window will abort the printing. Once you
have stopped the printing the printer goes on until it's buffer is
empty. You can continue reading the file while the printing is in
progress. It is not possible to put View to sleep, quit or to load a
new file while the printing is in progress.
LSHIFT+CTRL+P
->
This will dump the complete text in memory to the printer. The same
window as with
LSHIFT+CTRL+D
pops up to enable you to stop printing.
H
,
HELP
->
This puts some information about the author and the available key-
commands possible with this program.
Q
,
CTRL+C
,
ESC
,
Nk 5
->
This is a nasty one. Pressing any of these keys will quit View.
Fn
->
This enables you to mark blocks in the text in memory. This block
marking goes in two fases. The first time you press 'F1' the first
line on the screen will be the first line of text block #1. When you
press 'F1' again the last line on the screen will be the last line
of text block #1. Only when you have marked the first and the last
line of a text block the block will be marked. It's possible to mark
10 blocks in a text (F1..F10).
SHIFT+Fn
->
This will unmark text block #
n
making it free to mark another text
block.
CTRL+Fn
->
This will jump to the first line of text block #
nm.
LSHIFT+CTRL+Fn
->
This will dump text block #
n
to the printer. The printing window is
opened to enable you to stop the printing. You can continue to read
the file while the printing is in progress.
LALT+Fn
->
This will open the ReqTools FileRequester in which you can select a
name under which you can save text block #
n
.
CTRL+S
->
This will open the ReqTools FileRequester in which tou can select a
name under which you can save the whole text. Please note that all
tabs in the file are written as spaces.
M
->
This will toggle the mouse pointer. Sometimes it's better to switch
the mouse pointer off so that it won't get in your way. The mouse
will switch on again when a requester pops up on the screen. Also it
will always show when the program is reading a powerpacker crunched
file. This because you might load a crypted file which puts up the
requester for the password.
C
->
This will toggle the scroll mode. When the scroll mode is activated
the display will scroll to the next/previous page when a PageUp or
or PageDown key is pressed. When it isn't activated the program
will display the next/previous page immediatly.
When View is sleeping :
There are three "user-configurable" hotkeys which will signal View
to do something. These hotkeys can be set by passing a hotkey-
string (See below ) as an argument to view.
The following functions can be called with the use of hotkeys while
view is asleep.
QUIT
will quit View while it is asleep.
VIEW
will pop up the main screen and display the text
if remembered or otherwise put up the ReqTools
FileRequester for you to load a file. When the View
screen is open but not the frontmost screen it will
pop the screen to the front.
FLUSH
will erase the text, if remembered, from memory.
Ascii Check :
View uses a very simple routine that checks the first 100 (or less) bytes
of the file you wish to load. The following character codes are marked as
illegal (values are hexadecimal):
From $01 to $08.
From $0E to $1A.
From $1C to $1F.
From $80 to $9A.
When view encounters one of these values in the first 100 (or less) bytes
of the file the file wont be loaded.
Starting View :
You can start View from either the CLI/Shell or the Workbench. To start
View from the CLI/Shell you can type :
Run View [Name] [CX_PRIORITY=<pri>] [CX_POPUP=<YES|NO>] [VIEW=<hotkey>]
[FLUSH=<hotkey>] [QUIT=<hotkey>] [LACE] [SUPER] [A2024TENHZ]
[A2024FIFTEENHZ] [PRODUCTIVITY] [NOPOINTER] [TABS=<size>]
CX_PRIORITY/K/N, CX_POPUP/K, VIEW/K, FLUSH/K, QUIT/K, LACE/S,
SUPER/S, A2024TENHZ/S, A2024FIFTEENHZ/S, PRODUCTIVITY/S,
NOPOINTER/S,TABS/K/N
With: Name : An optional name of the file you want to read
or a pathname in which you want the
FileRequester to start looking for files.
CX_PRIORITY : With this argument you can specify the broker
priority in the commodities queue.
Default : 0
CX_POPUP : This enables you to enable/disable View from
opening it's window when it is started.
Default : YES
VIEW : With this argument you can set your own
specific hotkey to let View open it's window.
Default : lalt lcommand v
FLUSH : With this argument you can set your own
specific hotkey to let View flush it's text
buffer.
Default : lalt lcommand f
QUIT : With this argument you can set your own
specific hotkey to quit View while it's
asleep.
Default : lalt lcommand q
LACE : When this argument is specified View is
forced to open an interlaced screen.
SUPER : When this argument is specified View is
forced to open a superhires screen. When this
mode is not available the standard screen
resolution is used.
A2024TENHZ : When this argument is specified View is
forced to open a a2024 ten hertz screen. When
this mode is not available the standard
screen resolution is used.
A2024FIFTEENHZ : When this argument is specified View is
forced to open a a2024 fifteen hertz screen.
When this mode is not available the standard
screen resolution is used.
PRODUCTIVITY : When this argument is specified View is
forced to open a productivity screen. When
this mode is not available the standard
screen resolution is used.
NOPOINTER : When you specify this argument the mouse
pointer will not be shown.
SCROLL : When this argument is specified the display
will scroll each time a PageUp or PageDown
key is selected.
TABS : With this argument you can set the size of
a tab-jump that View should use. This cannot
be smaller than 2 or bigger than 16.
Default : 8
NOTE: You don't have to Run or RunBack the auto-detach version of view.
You can specify the last 13 arguments through the ToolTypes array of
the program it's icon for the Workbench. When you start View from
the WBStartup startup drawer you must set the DONOTWAIT tooltype also.
HotKey Strings :
With view you can specify your own hotkeys. The hotkey (Input Description
String) string has the following template:
[qualifier] [qualifier] [qua...] [highmap | ansi]
NOTE: There is more possible with the Input Description String but this
template makes the most sence for this aplication.
qualifier: lshift, rshift, shift, capslock, caps, control, lalt, ralt,
alt, lcommand, rcommand, numericpad, repeat, midbutton,
rbutton, leftbutton, relativemouse
higmap : comma, space, backspace, tab, enter, return, esc, del, up,
down, right, left, help, f1..f10, 0..9, (, ), /, *, -, +
ansi : a single character which is translated using the system default
keymap.
Requirements :
View requires Kickstart 2.0 to run. Also a copy of the "
nofrag.library
" is
required to be in the LIBS: directory of the boot disk. If you also have
the "
powerpacker.library
" in the LIBS: directory View is able to read
files crunched with PowerPacker. Also the "
reqtools.library
" is required
to be in your LIBS:. As of version 2.0 View uses the requesters from that
that library. You will need the
REGISTERED
version of DICE to recompile
the source code. When you use View to read PowerPacker crunched files make
sure that you have set-up 'T:' as a logical device. If not try to add the
following two lines in your startup-sequence :
MakeDir RAM:T
Assign T: RAM:T
Credits
Credits must go to
Matthew Dillon
for his wonderfull DICE C compiler and
his DME editor and DMouse and...and...and..., Thanks Matt! By the way,
you should register to DICE because it's the best deal you'll ever make!
Credits also must go to
Nico François
for his PowerPacker and his
powerpacker.library & reqtools.library. You should order a copy of
"PowerPacker professional". And credit must go to
Yves Perrenoud
for
finding the ugly "jump to last found string" bug. Thanks to
Richard
Hartmann
for finding a bug in the "Edit file" routine.
Notes :
View does not fragment memory because it uses the "
nofrag.library
" to
allocate the memory for the text. All escape sequences supported by the
console.device are supported by View. If the first character on a line is
a FormFeed View will translate it into F. The repeating of the keys
is handled in a way that View will never execute a function more than
once after you have released the keys. View automatically adapts itself to
the standard screen resolution, unless you specified another resolution,
and system font. You should use LEFT_AMIGA+M/N to switch screens because
View it's screen has no depth gadget. When you are a lucky owner of an
68030 machine I suggest you use the
CpuBlit
program by
Eddy Carrol
which
will stop the ugly flickering when multy coloured text is scrolled. From
version 1.6 on up this program will come in two versions. A normal
version which has the 'jump to editor' feature in the shell and an
auto-detach version that will detach itself from the shell automatically
which does not support the 'jump to editor' feature.
History :
2.0
- Totally re-written the earlier versions......
The following additions have been made since
the last official release (v1.5):
Now View only reads ascii files. All other
files are simply ignored.
The Editor option only works when View has
been started from the shell. ViewD does not
support this at all.
Added the posibility to let view open a
screen in a preferred screen mode.
Added the possibility to switch off the
mouse pointer.
Added the possibility to switch between
"scrolling" the page or just displaying it
when one of the Page Up/Down keys is
pressed.
Added the possibility to set the preffered
size of a tab-jump View must use.
Now View needs the reqtools.library. This
library provides _MUCH_ better requesters
than ASL does.
A lot of minor bugs fixed. The source has
been totally re-arranged to make it a lot
easier to read.
I have removed the small line editor because
it really didn't have anything to do with
the program plus that it was to limited to do
anything usefull with.
View is now distributed together with the
powerpacker and reqtools libraries. Also a
new version of the nofrag.library (v2.2) is
distributed with View. This new version has a
few bugs fixed and some mungwall hits removed
Bug reports, flames, constructive criticism (I hope I spelled this right),
PD programs, ideas to the following address :
Jan van den Baard
Bakkerstraat 176
3082 HE, Rotterdam
The Netherlands
Fido 2:500/29 (Jan van.den.Baard)